import request from '@/utils/request'


// 营业额统计
export const getTurnoverStatistics = (begin, end) => {
  return request({
    url: `/report/turnoverStatistics?begin=${begin}&end=${end}`,
    method: 'get'
  });
}


//用户统计
export const getUserStatistics = (begin, end) => {
  return request({
    url: `/report/userStatistics?begin=${begin}&end=${end}`,
    method: 'get'
  });
}

//订单统计
export const getOrdersStatistics = (begin, end) => {
  return request({
    url: `/report/ordersStatistics?begin=${begin}&end=${end}`,
    method: 'get'
  });
}

//订单统计
export const getTop10Statistics = (begin, end) => {
  return request({
    url: `/report/top10?begin=${begin}&end=${end}`,
    method: 'get'
  });
}


//导出近30天数据
  export const exportInfor = () => {
    return request({
      url: '/report/export',
      method: 'get',
      responseType: "arraybuffer" // 将 responseType 改为 arraybuffer
    })
  }
